package com.fanxuankai.boot.canal.client.autoconfigure;

import com.fanxuankai.boot.canal.client.MqBrokerEntryConsumer;
import com.fanxuankai.boot.mqbroker.producer.EventPublisher;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;

/**
 * @author fanxuankai
 */
@ConditionalOnClass({EventPublisher.class})
@ConditionalOnProperty(name = CanalClientProperties.ENABLED, matchIfMissing = true)
public class CanalClientMqBrokerAutoConfiguration {
    @Bean
    public MqBrokerEntryConsumer mqBrokerEntryConsumer() {
        return new MqBrokerEntryConsumer();
    }
}
